package pl.edu.agh.gronoMining.frequentSubgraphFinder.frequentSearcher.subgraph;

import pl.edu.agh.gronoMining.frequentSubgraphFinder.graph.Edge;
import pl.edu.agh.gronoMining.frequentSubgraphFinder.graph.Graph;

/**
 * Represents DFS Code graph representation
 */
public interface DFSCode {

	/**
	 * transform DFS code to Graph representation
	 * @return graph created using this dfs code
	 */
	public Graph getAsGraph();
	
	/**
	 * Add edge to graph
	 * @param id1 id of first node
	 * @param id2 id of second node
	 * @param type1 type of first node
	 * @param type2 type of second node
	 * @param label1 label of first node
	 * @param label2 label of second node
	 * @param edgeLabel label of edge
	 */
	public void addEdge(int id1, int id2, int type1, int type2, int label1, int label2, int edgeLabel);
	
	/**
	 * Ads edge to graph
	 * @param edge edge to add
	 */
	public void addEdge(Edge edge);
	
	/**
	 * create structure that maps input graph node id to inner dfs id. Should be call before adding edges.
	 */
	public void createOuterToInnterMap();
	
	/**
	 * removes structure created in method 'createOuterToInnterMap'. Should be called when all edges are added.
	 */
	public void removeOuterToInnterMap();
	
	public int[] getId1Array();
	
	public int[] getId2Array();
	
	public int[] getType1Array();
	
	public int[] getType2Array();
	
	public int[] getLabel1Array();
	
	public int[] getLabel2Array();
	
	public int[] getEdgeLabelArray();
	
}
